<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./js/vue.js"></script>
<body>
    <div class="box">
        <h1>{{xing}}</h1>
        <h1>{{mingzi}}</h1>
        <h1>{{xing}}{{mingzi}}</h1>
        <h1>{{xingming}}</h1>
    </div>
    <script>
        /* 姓名   姓  名字 */
        const vm = new Vue({
            el:'.box',
            data:{
                xing:'刘',//lastName
                mingzi:'小小'//firstName
            },
            // 计算属性的值是依赖data当中的值进行计算的
            computed:{
                xingming(){//fullName
                    return this.xing + this.mingzi
                }
            }
        })
    </script>
</body>
</html>